
// 接口继承

interface Shape {
  color: string;
}

interface Square extends Shape { // Square 继承了Shape属性
  sideLength: number;
}

let square = <Square>{};
square.color = "blue";
square.sideLength = 10;


// 接口多继承
interface Shape {
  color: string;
}

interface PenStroke {
  penWidth: number;
}

interface Square extends Shape, PenStroke {
  sideLength: number;
}


let squares = <Square>{};
squares.color = "blue";
square.sideLength = 10;
squares.penWidth = 5.0;